<form action="" class="form-horizontal" role="form">
	<div class="form-group">
	    <label class="col-sm-2 control-label">排列序号</label>
	    <div class="col-sm-2">
	      <input type="number" class="form-control" name="sort" min="0" placeholder="" datatype="n">
	    </div>
	</div>
	
	<div class="form-group">
	    <label class="col-sm-2 control-label">模块名称</label>
	    <div class="col-sm-2">
	      <input type="text" class="form-control" name="name" placeholder="" datatype="*">
	    </div>
	</div>
	
	<div class="form-group">
		<label class="col-sm-2 control-label">模块图片</label>
		<div class="col-sm-5">
			<div class="image-result-content"><img id="image-result" class="margin-bottom" /></div>
			<input type="text" id="image-text" name="image" class="form-control margin-bottom" />
			<input type="file" name="file_upload" id="image_upload" />
		</div>
	</div>
	
	<div class="form-group">
	    <label class="col-sm-2 control-label">模块说明</label>
	    <div class="col-sm-4">
	      <textarea class="form-control" name="intro" rows="5"></textarea>
	    </div>
	</div>
		
	<div class="form-group">
	    <label class="col-sm-2 control-label">模块标签</label>
	    <div class="col-sm-4">
	      <input type="text" class="form-control" name="tag" placeholder="" />
	    </div>
	</div>
	
	
		
	<div class="form-group">
		<div class="col-sm-offset-2 col-sm-8">
			<button type="submit" class="btn btn-primary" data-loading-txt="提交中，请稍后……" data-ajax-url="__CONTROLLER__/addPost">保存更改</button>
		</div>
	</div>
</form>
<style type="text/css">
	.image-result-content{max-height:50px; overflow:hidden; margin-bottom:5px;}
	#image-result{max-width:50px;}
</style>
<!-- uploadify -->
<link rel="stylesheet" href="__PUBLIC__/Style/Admin/Default/uploadify/uploadify.css">
<script type="text/javascript" src="__PUBLIC__/Style/Admin/Default/uploadify/jquery.uploadify.min.js?{:rand(0,9999)}"></script>
<script type="text/javascript">
$(function() {
    $("#image_upload").uploadify({
        'multi'			:	false,
        'fileSizeLimit' : 	'200kb',
        'buttonText'	:	'选择图片',
        'fileTypeDesc' 	: 	'Image Files',
        'fileTypeExts' 	: 	'*.jpg; *.png',
        'swf'			: 	'__PUBLIC__/Style/Admin/Default/uploadify/uploadify.swf',
        'uploader'		: 	'__CONTROLLER__/upload',
        'onUploadSuccess'	: function(data, res){
        	
        	var url = eval("(" + res + ")").extra.url;
        	$("#image-result").attr("src", url);
        	$("#image-text").val( url );
        	
        }
    });
});
</script>